
package DTO;

/**
 * This class acts as data transfer abstraction for store object attributes. It encapsulates address attributes.
 * This object is transferred back and forth amongst various layers.
 * @author tejinder
 * @see  DTO
 */
public class Store {

    private String storeName;
    private String phone;
    private String taxCode;
    private Address address;

    /**
     * default constructor
     */
    public Store() {
        storeName = "";
        phone = "";
        taxCode = "";
        address = new Address();
    }

    /**
     * parameterized constructor
     * @param storeName a string for name of store
     * @param phone a string for phone number
     * @param taxCode a string for associated  tax code
     * @param address an address data transfer object 
     */
    public Store(String storeName, String phone, String taxCode, Address address) {
        this.storeName = storeName;
        this.phone = phone;
        this.taxCode = taxCode;
        this.address = address;
    }

    /**
     * gets name of store
     * @return
     */
    public String getStoreName() {
        return storeName;
    }

    /**
     * sets  name of store
     * @param storeName
     */
    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * gets phone number
     * @return
     */
    public String getPhone() {
        return phone;
    }

    /**
     * sets phone number
     * @param phone
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * gets tax code
     * @return
     */
    public String getTaxCode() {
        return taxCode;
    }

    /**
     * sets tax code
     * @param taxCode
     */
    public void setTaxCode(String taxCode) {
        this.taxCode = taxCode;
    }

    /**
     * gets address
     * @return
     */
    public Address getAddress() {
        return address;
    }

    /**
     * sets address
     * @param address
     */
    public void setAddress(Address address) {
        this.address = address;
    }

    /**
     * toString() method overrides the default behavior of Object class toString() method.
     * @return  a string representing the state of object
     */
    public String toString() {
        return "Store: " + storeName + "\n" + "Address: " + address.toString() +
                "\n" + "Phone #: " + phone;
    }
}
